<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>

    var arr = [20,30,50,60,88,63,76,100,1000,555];
    var max = arr[1];
    var min = arr[2];
    for(var i= 0;i<arr.length;i++){
        if (min>arr[i]){
            min=arr[i];
        }
        if (max<arr[i]){
            max=arr[i];
        }
    }


    console.log("最大值"+max);
    console.log("最小值"+min);




</script>
</body>
</html>